package com.uwlaser.service;

import com.uwlaser.base.PageInfo;
import com.uwlaser.base.CommonService;
import com.uwlaser.domain.DataCellCapacity;
import com.uwlaser.service.dto.CheckGearResult;
import com.uwlaser.service.dto.DataCellCapacityDto;
import com.uwlaser.service.dto.DataCellCapacityQueryParam;
import com.uwlaser.service.dto.GetCapacityByProductSnParam;
import org.springframework.data.domain.Pageable;
import java.util.List;
import java.util.Set;

/**
* @author caoguilin
* @date 2023-02-06
*/
public interface DataCellCapacityService extends CommonService<DataCellCapacity>  {

    static final String CACHE_KEY = "dataCellCapacity";

    /**
    * 查询数据分页
    * @param query 条件
    * @param pageable 分页参数
    * @return PageInfo<DataCellCapacityDto>
    */
    PageInfo<DataCellCapacityDto> queryAll(DataCellCapacityQueryParam query, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param query 条件参数
    * @return List<DataCellCapacityDto>
    */
    List<DataCellCapacityDto> queryAll(DataCellCapacityQueryParam query);

    DataCellCapacity getById(Integer id);
    DataCellCapacityDto findById(Integer id);

    /**
     * 插入一条新数据。
     */
    int insert(DataCellCapacityDto resources);
    int updateById(DataCellCapacityDto resources);
    int removeById(Integer id);
    int removeByIds(Set<Integer> ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    // void download(List<DataCellCapacityDto> all, HttpServletResponse response) throws IOException;

    int importCellCapacityBatch(List<DataCellCapacityDto> dataCellCapacityDtoList);

    DataCellCapacityDto getCapacityByProductSn(GetCapacityByProductSnParam param);

    CheckGearResult checkGear(GetCapacityByProductSnParam param);
}
